﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Mt.Site.Application.ContentManagement.FrontEnd.Dto
{
    public class _PreAndNextDto
    {
        /// <summary>
        /// 有上一页（判断链接和标题不为空）
        /// </summary>
        public bool HasPre {
            get {
                return !string.IsNullOrEmpty(PreLink) && !string.IsNullOrEmpty(PreTitle);
            }
        }

        /// <summary>
        /// 有下一页（判断链接和标题不为空）
        /// </summary>
        public bool HasNext {
            get
            {
                return !string.IsNullOrEmpty(NextLink) && !string.IsNullOrEmpty(NextTitle);
            }
        }

        /// <summary>
        /// 上一条数据链接
        /// </summary>
        public string PreLink { get; set; }

        /// <summary>
        /// 上一条数据标题
        /// </summary>
        public string PreTitle { get; set; }

        /// <summary>
        /// 下一条数据链接
        /// </summary>
        public string NextLink { get; set; }

        /// <summary>
        /// 下一条数据标题
        /// </summary>
        public string NextTitle { get; set; }
    }
}
